package com.nj9you.sdk.pay;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

import com.nj9you.sdk.framework.IPayFunction;
import com.nj9you.sdk.params.PayParams;
import com.nj9you.sdk.utils.Utils;

/**
 * 威富通
 */
public class SwiftPay implements IPay {
    private Context mContext;
    private IPayFunction mPayFunction;

    @Override
    public void init(Context context, IPayFunction f) {
        mContext = context;
        mPayFunction = f;
    }

    @Override
    public void pay(PayParams payParams) {
        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("weixin://wxpay/bizpayurl?appid=wxb489e8caeabcdefg&noncestr=BBvdr5atZ9D7s08X&productid=1234567890&sign=e15d2466a85cd62b530e2f690604e7502f67ccb5&timestamp=1408025996"));
        mContext.startActivity(intent);
    }

    @Override
    public String getPayName() {
        return mContext.getString(Utils.getStringId(mContext, "jy_swift_pay"));
    }

    @Override
    public int getPayType() {
        return PAY_TYPE_SWIFT;
    }

    @Override
    public boolean checkPayAvailable() {
        return false;
    }

    @Override
    public int getPayIcon() {
        return 0;
    }

    @Override
    public String getPayDesc() {
        return null;
    }

    @Override
    public String toString() {
        return getPayName();
    }
}
